<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(4)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑用户</title>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" language="JavaScript" src="admin_js/common.js"></script> 
</head>
<body>
<%
dim id,rsa,sqlt,name,u_level,question,answer
id=GetIntQueryString("id")
Set rsa = Server.CreateObject("ADODB.Recordset")
sqlt = "select * from [c_user] where id="&id
rsa.open sqlt,conn,1,1
If rsa.eof Or rsa.bof Then 
response.redirect("showmsg.asp?from=user_list.asp&msg=NoRecord")
else
name=rsa("name")
u_level=rsa("level")
question=rsa("question")
answer=rsa("answer")
End If 
rsa.close
Set rsa=Nothing 
%>
<form method="post" name="adduserform" action="user_save.asp">
 <input type="hidden" name="id" value="<%=id%>">
<input type="hidden" name="act" value="modifysave">	
<table  cellspacing="0" cellpadding="0" class="table_400">
<tr>
	<th colspan="2">修改用户</th>
</tr>
<tr class="row">
	<td>用户名</td>
	<td><input type="text" style="color:gray" id="name" name="name" value="<%=name%>" readonly="true"></td>
</tr>
<tr class="row">
	<td height="30" align="center">密码</td>
	<td><input type="password" name="password" >（如果不需修改请留空）</td>
</tr>
<tr class="row">
	<td height="30" align="center">管理级别</td>
	<td>
	<select name="level">
	<option value="1" <%If u_level=1 Then response.write(" selected='selected'") End If %>>普通管理员</option>
	<option value="4"  <%If u_level=4 Then response.write(" selected='selected'") End If %>>系统管理员</option>
	</select></td>
</tr>
<tr class="row">
	<td>安全提问</td>
	<td>
	<select id="question" name="question">
		<option value="母亲的名字" <%If question="母亲的名字" Then response.write("selected=""selected""") End If%>>母亲的名字</option>
		<option value="爱人的名字" <%If question="爱人的名字" Then response.write("selected=""selected""") End If%>>爱人的名字</option>
		<option value="父亲出生的城市" <%If question="父亲出生的城市" Then response.write("selected=""selected""") End If%>>父亲出生的城市</option>
		<option value="您最尊敬的老师的名字" <%If question="您最尊敬的老师的名字" Then response.write("selected=""selected""") End If%>>您最尊敬的老师的名字</option>
		<option value="您手机的型号" <%If question="您手机的型号" Then response.write("selected=""selected""") End If%>>您手机的型号</option>
		<option value="您最喜欢的食物" <%If question="您最喜欢的食物" Then response.write("selected=""selected""") End If%>>您最喜欢的食物</option>
		<option value="您宠物的名字" <%If question="您宠物的名字" Then response.write("selected=""selected""") End If%>>您宠物的名字</option>
		<option value="只有我知道的问题" <%If question="只有我知道的问题" Then response.write("selected=""selected""") End If%>>只有我知道的问题</option>
		<option value="山林客代号" <%If question="山林客代号" Then response.write("selected=""selected""") End If%>>山林客代号</option>
	</select>
	</td>
</tr>
<tr class="row">
	<td>答案</td>
	<td><input name="answer" id="answer" type="text" size="10" maxlength="20" value="<%=answer%>"/>
</td>
</tr>
<tr  class="row">
	<td colspan="2" class="tdcenter"><input type="button" value="保存"  class="btn"  onclick="checkForm('modifyuser');">&nbsp;&nbsp;<input type="reset"  class="btn"  value="重置">&nbsp;&nbsp;<input type="button" class="btn"  value="返回" onclick="javascript:location.href='user_list.asp'"/></td>
</tr>
</table>
</form>
</body>
</html>